// @/api/MaintenanceRecord/zhongmao.js
import request from '@/utils/request';

export function selectAll() {
  return request({
    url: `/MaintenanceRecord/zhongmao/selectAll`,
    method: 'get'
  });
}

// 添加
export function addZhongmao(data) {
  return request({
    url: `/MaintenanceRecord/zhongmao/add`,
    method: 'post',
    data: data
  });
}

// 更新
export function updateZhongmao(zmid, data) {
  return request({
    url: `/MaintenanceRecord/zhongmao/update/${zmid}`,
    method: 'put',
    data: data
  });
}

// 删除（逻辑删除）
export function deleteZhongmao(zmid) {
  return request({
    url: `/MaintenanceRecord/zhongmao/delete/${zmid}`,
    method: 'delete'
  });
}

// 下载
export function downloadZhongmao() {
  return request({
    url: `/MaintenanceRecord/zhongmao/download`,
    method: 'GET',
    responseType: 'blob'
  });
}